package com.weetop.akly.appConfig;

import android.content.Context;
import android.widget.ImageView;

import com.bumptech.glide.Glide;
import com.bumptech.glide.load.resource.bitmap.CenterCrop;
import com.bumptech.glide.request.RequestOptions;
import com.weetop.akly.R;
import com.youth.banner.loader.ImageLoader;

public class GlideImageLoader extends ImageLoader {
    @Override
    public void displayImage(Context context, Object path, ImageView imageView) {

        //Glide 加载图片简单用法
        Glide.with(context)
                .load(path)
                .apply(new RequestOptions()
                        .apply(new RequestOptions().transforms(new CenterCrop()))//, new RoundedCorners(dp2px(5))
                        .placeholder(R.drawable.drawable_bg)
                        .fallback(R.drawable.drawable_bg)
                        .error(R.drawable.drawable_bg))
                .into(imageView);
     //   GlideUtil.load(context,imageView,(String)path);
    }


}